<form id="add-form" class="form-horizontal nice-validator n-default" role="form" data-toggle="validator" method="POST" action="" novalidate="novalidate">
	<div class="form-group">
		<label class="control-label col-xs-6 col-sm-2">客户:</label>
		<div class="col-xs-10 col-sm-10">
			<div class="input-group dis-flex">
				<div class="input-group-addon no-border no-padding">
					<span><button type="button" class="btn btn-primary  btn-user"><i class="fa fa-list"></i>选择</button></span>
				</div>
			</div>
		</div>
	</div>
	<!-- 已选客户显示位置 -->
	<div class="form-group">
		<label class="control-label col-xs-6 col-sm-2"></label>
		<div id="userbox" class="col-xs-10 col-sm-10"><table id="table1" class="table table-bordered text-center" width="70%">
			<thead>
			<tr>
				<th>客户名称</th>
				<th>会员等级</th>
				<th>手机号码</th>
				<th>操作</th>
			</tr>
			</thead>
			<tbody>
			<tr>
				<input type="hidden" name="user_id" value="{$row.user_id}">
				<input type="hidden" name="vip_discount" value="{$row.vip_discount}">
				<td><input readonly="" class="nostyle" name="nickname" value="{$row.user.nickname}"></td>
				<td><input readonly="" class="nostyle" name="vip" value="{$row.user.vip}"></td>
				<td><input readonly="" class="nostyle" name="phone" value="{$row.user.phone}"></td>
				<td>
					<a href="javascript:;" class="btn-danger btn-sm userdel">删除</a>
				</td>
			</tr>
			</tbody>
		</table></div>
	</div>
	<div class="form-group">
		<label class="control-label col-xs-6 col-sm-2">服务:</label>
		<div class="col-xs-10 col-sm-10">
			<div class="input-group dis-flex">
				<div class="input-group-addon no-border no-padding">
					<span><button type="button" class="btn btn-primary service" data-input-id="c-image" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i>选择</button></span>
				</div>
			</div>
		</div>
	</div>

	<!-- 已选服务显示位置 -->
	<div class="form-group">
		<label class="control-label col-xs-6 col-sm-2"></label>
		<div class="col-xs-10 col-sm-10">
			<table id="service_table" class="table table-bordered text-center" width="70%">
				<thead>
				<tr>
					<th>服务名称</th>
					<th>单价</th>
					<th>数量</th>
					<th>小计</th>
					<th>技师</th>
					<th>操作</th>
				</tr>
				</thead>
				<tbody>
				{foreach name="row.service" item="vo"}
				<tr id="{$key}">
					<input type="hidden" name="service[{$key}][service_id]" value="{$vo.service_id}">
					<td><input readonly="" class="nostyle" name="service[{$key}][service_name]" value="{$vo.service_name}"></td>
					<td><input readonly="" class="nostyle" name="service[{$key}][price]" value="{$vo.price}"></td>
					<td><input id="serve_num0" t-id="changefun" class="w70" type="number" min="0" data-rule="required" data-msg-required="必填" data-target="#msg_holder1" name="service[{$key}][num]" value="{$vo.num}"><span class="msg-box" id="msg_holder1"></span></td>
					<td><input readonly="" id="total0" class="nostyle" type="number" min="0" data-msg-required="必填" data-target="#msg_holder2" data-rule="required" name="service[{$key}][total]" value="{$vo.total_money}"><span class="msg-box" id="msg_holder2"></span></td>
					<td>
						<div class="technician" data-index="0">
							<div id="choose0" class="">
								<input type="hidden" name="service[{$key}][design_id]" value="{if $vo.design}{$vo.design.id}{/if}">
								<input id="design_id0" data-rule="required" data-msg-required="必填" data-target="#msg_holder3" readonly="" class="nostyle" name="service[{$key}][design_name]" style="display:block" value="{if $vo.design}{$vo.design.nickname}{/if}">
							</div>
							<span class="msg-box" id="msg_holder3"></span>
						</div>
					</td>
					<td>
						<a href="javascript:;" class="btn-danger btn-sm servicedel" data-id="0">删除</a>
					</td>
				</tr>
				{/foreach}
				</tbody>
			</table>
		</div>
	</div>

	<div class="form-group">
		<label class="control-label col-xs-6 col-sm-2">优惠券:</label>
		<div class="col-xs-10 col-sm-10">
			<div class="input-group dis-flex">
				<div class="input-group-addon no-border no-padding">
					<span><button type="button" class="btn btn-primary coupon" data-input-id="c-image" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i>选择</button></span>
				</div>
			</div>
		</div>
	</div>
	<!-- 已选优惠券显示位置 -->

	<div class="form-group coupon">
		<label class="control-label col-xs-6 col-sm-2"></label>
		<div id="tablebox" class="col-xs-10 col-sm-10">
			<table id="table2" class="table table-bordered text-center" width="70%" {if !$row.user_coupon}hidden{/if}>
			<thead>
			<tr>
				<th>优惠券名称</th>
				<th>优惠金额</th>
				<th>操作</th>
			</tr>
			</thead>
			<tbody>
			<tr>
				<input type="hidden" name="user_coupon_id" value="{$row.user_coupon.id}">
				<input type="hidden" name="coupon_discount" value="{if $row.user_coupon.type == 2}{$row.user_coupon.discount_amount}{/if}">
				<td><input readonly="" class="nostyle" name="coupon_name" value="{$row.user_coupon.coupon_name}"></td>
				<td><input readonly="" class="nostyle" name="coupon_price" value="{$row.user_coupon.discount_amount}"></td>
				<td>
					<a href="javascript:;" class="btn-danger btn-sm del">删除</a>
				</td>
			</tr>
			</tbody>
		</table></div>
	</div>

	<div class="form-group">
		<label class="control-label col-xs-6 col-sm-2">会员优惠金额:</label>
		<div class="col-xs-10 col-sm-10 pt-7">
			<input type="" name="vip_amount" class="nostyle1 pl-12" readonly="" id="" value="{$row.vip_amount}">
		</div>
	</div>
	<div class="form-group">
		<label class="control-label col-xs-6 col-sm-2">优惠金额:</label>
		<div class="col-xs-10 col-sm-10 pt-7 ">
			<input type="" name="discount_amount" class="nostyle1 pl-12" readonly="" id="" value="{$row.discount_amount}">
		</div>
	</div>
	<div class="form-group">
		<label class="control-label col-xs-6 col-sm-2">合计金额:</label>
		<div class="col-xs-10 col-sm-10 pt-7 ">
			<input type="" name="total_amount" class="nostyle1 pl-12" readonly=""  value="{$row.total_amount}">
		</div>
	</div>

	<div class="form-group">
		<label class="control-label col-xs-6 col-sm-2">待付款金额:</label>
		<div class="col-xs-10 col-sm-10 ">
			<input type="number" name="real_amount" style="width:200px;" class="form-control" step="0.01" min="0" value="{$row.real_amount}">
		</div>
	</div>
	<div class="form-group">
		<label class="control-label col-xs-2 col-sm-2 col-md-2">支付方式:</label>
		<div class="col-xs-10 col-sm-6 col-md-6">
			<div class="radio">
				<label for="payment-1"><input id="payment-1" type="radio" name="payment" value="1">现金支付</label>
				<label for="payment-2"><input id="payment-2" type="radio" name="payment" value="2">余额支付</label>
				<label for="payment-3"><input id="payment-3" type="radio" name="payment" value="3">扫码支付</label>
			</div>
		</div>
	</div>

	<div class="form-group img" {if $row.payment !=3 }hidden{/if}>
		<label class="control-label col-xs-2 col-sm-2 col-md-2">小程序码：</label>
		<div class="col-xs-10 col-sm-6 col-md-6">
			<img src="{$row.code}" alt="">
		</div>
	</div>

	<div class="form-group layer-footer">
		<label class="control-label col-xs-6 col-sm-2"></label>
		<div class="col-xs-10 col-sm-10">
			<button type="submit" class="btn btn-success">确认收款</button>
		</div>
	</div>

</form>

<style type="text/css">
	#add-form{
		background: white;
		padding:20px 0;
	}
	#table{
		margin: 40px 0;
	}
	#table1{
		margin: 20px 0;

	}
	.dis-flex{
		display: flex;
	}
	.pt-7{
		padding-top: 7px;
	}
	.w70{
		width:70px!important;
	}
	.nostyle{
		border: none;
		text-align: center;
		background: white;
		outline: none;
		margin: 0 auto;
	}
	.nostyle1{
		border: none;
		background: white;
		outline: none;
	}
	.dis-none{
		display: none!important;
	}
	.pl-12{
		padding-left: 12px;
	}
</style>